package com.wxm.eum;

/**
 * <p>
 *      签名类型枚举
 * </p>
 *
 * @author: wxm
 * @Date: 2023/4/14
 */
public enum SignTypeEnum {
    MD5("MD5"),
    SM2("SM2"),
    RSA("RSA")
    ;
    private String code;

    SignTypeEnum(String code) {
        this.code = code;
    }

    public String getCode() {
        return code;
    }
    public void setCode(String code) {
        this.code = code;
    }

    public static SignTypeEnum getByCode(String code){
        SignTypeEnum[] enums = SignTypeEnum.class.getEnumConstants();
        for (SignTypeEnum anEnum : enums) {
            if (anEnum.code.equals(code)){
                return anEnum;
            }
        }
        return null;
    }
}
